<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-tAnswer-edit" th:object="${tAnswer}">
            <input id="sId" name="sId" th:field="*{sId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">选项内容：</label>
				<div class="col-sm-8">
					<input id="sName" name="sName" th:field="*{sName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">是否为正确答案,0：是，1：否：</label>
				<div class="col-sm-8">
					<input id="isRight" name="isRight" th:field="*{isRight}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">：</label>
				<div class="col-sm-8">
					<input id="qId" name="qId" th:field="*{qId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">选项顺序，按照先后顺序系统自动排序，为标准卷使用。：</label>
				<div class="col-sm-8">
					<input id="sSort" name="sSort" th:field="*{sSort}" class="form-control" type="text">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/tAnswer";
		$("#form-tAnswer-edit").validate({
            rules:{
                sName:{
                    required:true,
                },
                isRight:{
                    required:true,
                },
                sSort:{
                    required:true,
                }
            }
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-tAnswer-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
